package com.bl.weilan.dao.repository;

import com.bl.weilan.dao.model.CompanyStockholderEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface CompanyStockholderRepository extends JpaRepository<CompanyStockholderEntity, String> {
    Page<CompanyStockholderEntity> findByCompanyId(String companyId, Pageable pageable);
    List<CompanyStockholderEntity> findByCompanyIdOrderByWeightDesc(String companyId);

    void deleteByCompanyId(String companyId);

}
